/*
 Navicat MySQL Data Transfer

 Source Server         : 本地
 Source Server Version : 50542
 Source Host           : localhost
 Source Database       : wx_qiaqia

 Target Server Version : 50542
 File Encoding         : utf-8

 Date: 10/22/2015 17:52:59 PM
*/

SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `qnh_admin`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_admin`;
CREATE TABLE `qnh_admin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(16) NOT NULL,
  `password` varchar(75) NOT NULL,
  `email` varchar(75) NOT NULL,
  `group_id` int(11) NOT NULL,
  `status` tinyint(3) NOT NULL,
  `created` int(11) NOT NULL,
  `modified` int(11) DEFAULT NULL,
  `qq` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qnh_admin`
-- ----------------------------
BEGIN;
INSERT INTO `qnh_admin` VALUES ('1', 'admin', '7fef6171469e80d32c0559f88b377245', 'admin@admin2.com', '1', '1', '1400350295', '1402147940', '2147483647'), ('2', 'yufei', '96e79218965eb72c92a549dd5a330112', '1628702028@qq.com', '2', '0', '1436175442', '1436538599', '1628702028');
COMMIT;

-- ----------------------------
--  Table structure for `qnh_admin_action`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_admin_action`;
CREATE TABLE `qnh_admin_action` (
  `mod_id` int(11) NOT NULL AUTO_INCREMENT,
  `mod_name` varchar(60) NOT NULL,
  `mod_code` varchar(60) NOT NULL,
  `action_id` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL,
  PRIMARY KEY (`mod_id`)
) ENGINE=MyISAM AUTO_INCREMENT=62 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qnh_admin_action`
-- ----------------------------
BEGIN;
INSERT INTO `qnh_admin_action` VALUES ('1', '站点信息', 'site_info', '1', '1'), ('2', '数据备份', 'backup', '1', '1'), ('3', '邮箱设置', 'set_mail', '1', '1'), ('4', '添加菜单', 'addmenu', '2', '1'), ('5', '删除菜单', 'delmenu', '2', '1'), ('6', '编辑菜单', 'editmenu', '2', '1'), ('7', '添加版块', 'addgroup', '5', '1'), ('8', '编辑版块', 'editgroup', '5', '1'), ('9', '删除版块', 'delgroup', '5', '1'), ('10', '添加版块内容', 'addimage', '5', '1'), ('11', '编辑版块内容', 'editimage', '5', '1'), ('12', '删除版块内容', 'delimage', '5', '1'), ('13', '添加角色', 'adduser', '4', '1'), ('14', '编辑角色', 'edituser', '4', '1'), ('15', '删除角色', 'deluser', '4', '1'), ('16', '添加管理员', 'addmem', '4', '1'), ('17', '编辑管理员', 'editmem', '4', '1'), ('18', '删除管理员', 'delmem', '4', '1'), ('19', '发布文章', 'add_news', '6', '1'), ('20', '编辑文章', 'edit_news', '6', '1'), ('21', '删除文章', 'del_news', '6', '1'), ('22', '微信设置', 'set_weixin', '7', '1'), ('23', '添加微信规则', 'add_rule', '7', '1'), ('24', '编辑微信规则', 'edit_rule', '7', '1'), ('25', '删除微信规则', 'del_rule', '7', '1'), ('26', '添加微信菜单', 'add_wx_menu', '7', '1'), ('27', '编辑微信菜单', 'edit_wx_menu', '7', '1'), ('28', '删除微信菜单', 'del_wx_menu', '7', '1'), ('29', '提交微信菜单', 'set_wx_menu', '7', '1'), ('30', '添加关键词', 'add_key', '7', '1'), ('31', '编辑关键词', 'edit_key', '7', '1'), ('32', '删除关键词', 'del_key', '7', '1'), ('33', '文章排序', 'order_news', '6', '1'), ('34', '排序版块内容', 'orderimage', '5', '1'), ('35', '更新微信菜单', 'ud_wx_menu', '7', '1'), ('36', '排序微信菜单', 'ord_wx_menu', '7', '1'), ('37', '添加字段', 'add_word', '3', '1'), ('38', '编辑字段', 'edit_word', '3', '1'), ('39', '删除字段', 'del_word', '3', '1'), ('40', '添加表单', 'add_form', '3', '1'), ('41', '编辑表单', 'edit_form', '3', '1'), ('42', '删除表单', 'del_form', '3', '1'), ('43', '添加表单字段', 'add_form_word', '3', '1'), ('44', '编辑表单字段', 'edit_form_word', '3', '1'), ('45', '删除表单字段', 'del_form_word', '3', '1'), ('46', '排序表单字段', 'order_form_word', '3', '1'), ('47', '删除表单数据', 'del_log', '3', '1'), ('48', '导出表单数据', 'dao_log', '3', '1'), ('49', '导入表单数据', 'entry_log', '3', '1'), ('50', '添加商品品牌', 'add_brand', '8', '1'), ('51', '编辑商品品牌', 'edit_brand', '8', '1'), ('52', '删除商品品牌', 'del_brand', '8', '1'), ('53', '编辑商品属性', 'edit_attr', '8', '1'), ('54', '删除商品属性', 'del_attr', '8', '1'), ('55', '添加商品类型', 'add_type', '8', '1'), ('56', '编辑商品类型', 'edit_type', '8', '1'), ('57', '删除商品类型', 'del_type', '8', '1'), ('58', '添加商品', 'add_goods', '8', '1'), ('59', '编辑商品', 'edit_goods', '8', '1'), ('60', '删除商品', 'del_goods', '8', '1'), ('61', '添加商品属性', 'add_attr', '8', '1');
COMMIT;

-- ----------------------------
--  Table structure for `qnh_admin_action_list`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_admin_action_list`;
CREATE TABLE `qnh_admin_action_list` (
  `action_id` int(11) NOT NULL AUTO_INCREMENT,
  `action_list` varchar(50) NOT NULL,
  `action_child` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`action_id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qnh_admin_action_list`
-- ----------------------------
BEGIN;
INSERT INTO `qnh_admin_action_list` VALUES ('1', '系统设置', '3'), ('2', '栏目管理', '3'), ('3', '表单管理', '13'), ('4', '权限管理', '6'), ('5', '版块管理', '7'), ('6', '文章管理', '4'), ('7', '微信管理', '14'), ('8', '商品管理', '12');
COMMIT;

-- ----------------------------
--  Table structure for `qnh_admin_role`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_admin_role`;
CREATE TABLE `qnh_admin_role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_name` varchar(60) DEFAULT NULL,
  `role_des` text,
  `role_mod` text,
  `role_action` text COMMENT '角色权限',
  `created` int(11) NOT NULL,
  `modified` int(11) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qnh_admin_role`
-- ----------------------------
BEGIN;
INSERT INTO `qnh_admin_role` VALUES ('1', '超级管理员', '超级管理员', '-1', '-1', '1412136639', '1412435579', '1'), ('2', '网站运营管理员', '该角色等级只低于超级管理员', '1,2,3,4,5,6,46,48,49,7,8,9,10,11,12,19,20,21,22,23,24,25,26,27,28,29,30,31,32,35,36,50,51,52,53,54,55,56,57,58,59,60,61', '1,2,3,5,6,7,8', '1436169318', '1437815488', '0');
COMMIT;

-- ----------------------------
--  Table structure for `qnh_basic_reply`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_basic_reply`;
CREATE TABLE `qnh_basic_reply` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rid` int(10) unsigned NOT NULL DEFAULT '0',
  `content` varchar(1000) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qnh_favor`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_favor`;
CREATE TABLE `qnh_favor` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `data_id` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `icon` tinyint(3) DEFAULT '1',
  `admin_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qnh_news_reply`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_news_reply`;
CREATE TABLE `qnh_news_reply` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `rid` int(10) unsigned NOT NULL,
  `title` varchar(50) NOT NULL,
  `description` varchar(255) NOT NULL,
  `thumb` varchar(60) NOT NULL,
  `url` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qnh_options`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_options`;
CREATE TABLE `qnh_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `op_key` varchar(255) NOT NULL,
  `op_value` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `op_key` (`op_key`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
--  Records of `qnh_options`
-- ----------------------------
BEGIN;
INSERT INTO `qnh_options` VALUES ('1', 'domain', 'http://'), ('2', 'site_name', '练习版本'), ('3', 'site_keyword', '练习版本'), ('4', 'site_abs', '练习版本'), ('5', 'copyright', '练习版本'), ('6', 'icp', '练习版本'), ('7', 'site_des', '练习版本'), ('8', 'wap_support', '1'), ('9', 'home_tpl', 'default'), ('10', 'wxdreply', '2'), ('11', 'wxareply', '1'), ('12', 'site_logo', '/Uploads/sys/201507/1436795580763286867.gif'), ('13', 'wxmenu', '{\"menu\":{\"button\":[{\"type\":\"click\",\"name\":\"今日歌曲\",\"key\":\"V1001_TODAY_MUSIC\",\"sub_button\":[]},{\"name\":\"菜单\",\"sub_button\":[{\"type\":\"view\",\"name\":\"绑定\",\"url\":\"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3e2a79adcf6278f9&redirect_uri=http%3A%2F%2Fwww.chinesefamouswine.com%2Fmobile%2Fuser.php&response_type=code&scope=snsapi_base&state=123#wechat_redirect\",\"sub_button\":[]},{\"type\":\"view\",\"name\":\"首页\",\"url\":\"https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx3e2a79adcf6278f9&redirect_uri=http%3A%2F%2Fwww.chinesefamouswine.com%2Fmobile%2F&response_type=code&scope=snsapi_base&state=123#wechat_redirect\",\"sub_button\":[]},{\"type\":\"click\",\"name\":\"赞一下我们\",\"key\":\"V1001_GOOD\",\"sub_button\":[]}]}]}}'), ('14', 'email_type', '1'), ('15', 'smtp', ''), ('16', 'smtp_username', ''), ('17', 'smtp_password', ''), ('18', 'smtp_email', '');
COMMIT;

-- ----------------------------
--  Table structure for `qnh_rule`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_rule`;
CREATE TABLE `qnh_rule` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `createtime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  `type` tinyint(3) NOT NULL COMMENT '信息类型',
  `modifytime` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qnh_wxkeyword`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_wxkeyword`;
CREATE TABLE `qnh_wxkeyword` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rid` int(11) NOT NULL,
  `keyword` varchar(100) NOT NULL,
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '类型包含还是完全匹配',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- ----------------------------
--  Table structure for `qnh_wxmenu`
-- ----------------------------
DROP TABLE IF EXISTS `qnh_wxmenu`;
CREATE TABLE `qnh_wxmenu` (
  `id` smallint(5) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `url` varchar(255) NOT NULL DEFAULT '',
  `ordering` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `is_show` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `parent_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  `rule` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cat_type` (`type`),
  KEY `sort_order` (`ordering`),
  KEY `parent_id` (`parent_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

SET FOREIGN_KEY_CHECKS = 1;
